﻿using BCCommon.TMS.Driver;
using BCEntity.TMS.WorkingReport;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace BCData.TMS.WorkingReport
{
    public interface IWorkingReportData
    {

        /// <summary>
        /// 新增工作上报
        /// </summary>
        /// <param name="entity">工作内容信息</param>
        /// <returns></returns>
        Task<WorkingReportEntity> InsertAsync(WorkingReportEntity entity);

        /// <summary>
        /// 分页查询工作上报列表信息
        /// </summary>
        /// <param name="companyId">公司Id</param>
        /// <param name="phone">手机号</param> 
        /// <param name="start">上报开始时间</param>
        /// <param name="end">上报结束时间</param>
        /// <param name="role">角色</param>
        /// <param name="ascending">是否升序排序</param>
        /// <param name="sortName">排序字段</param>
        /// <param name="pageIndex">分页页数</param>
        /// <param name="pageSize">分页页码</param>
        /// <returns></returns>
        Task<(IEnumerable<WorkingReportEntity>, int)> GetListAsync(long? companyId, string phone,  DateTime? start, DateTime? end, DriverRoleType? role, bool? ascending, string sortName, int pageIndex, int pageSize);
        /// <summary>
        /// 获取指定的工作上报信息
        /// </summary>
        /// <param name="workingReportId">工作报告Id</param>
        /// <returns></returns>
        Task<WorkingReportEntity> GetAsync(long workingReportId);
    }
}
